package com.excilys.model;

import javax.persistence.Entity;

import org.joda.time.DateTime;

/**
 * POJO Check transaction between two accounts.
 * 
 * @author excilys dev : YA
 * @version 1.0
 * 
 */
@SuppressWarnings("serial")
@Entity
public class TransactionCheck extends Transaction {

	private String checkRecipient;

	// ------------------------------------------------------------
	// ------------------------------------------------------------
	// ------------------------------------------------------------

	public TransactionCheck() {
		this.transactionType = TransactionType.CHECK;
	}

	public TransactionCheck(double transactionAmount, DateTime transactionDate, Account transactionAccount, String checkRecipient) {
		super(transactionAmount, transactionDate, transactionAccount);
		this.checkRecipient = checkRecipient;
		this.transactionType = TransactionType.CHECK;
	}

	// ------------------------------------------------------------
	// ------------------------------------------------------------
	// ------------------------------------------------------------

	@Override
	public String printLabel() {
		return this.getRecipient();
	}

	// ------------------------------------------------------------
	// ------------------------------------------------------------
	// ------------------------------------------------------------

	public String getRecipient() {
		return checkRecipient;
	}

	public void setRecipient(String checkRecipient) {
		this.checkRecipient = checkRecipient;
	}

}
